
from pepe.glib import *
import csv_show

def main(filemask):
    for inpfile in glob.glob(filemask):

        # 2010-10-22_2257 vp
        ## using underscore instead dot because .# utilities 
        ## cut out everything after dot and then is not clear 
        ## whether utility was run on original file or on output
        ## of other .# utility that processed given file
        #sys.stdout = open(inpfile+'.hdr.#', 'w')
        sys.stdout = open(inpfile+'_hdr.#', 'w')
        
        csv_show.csv_hshow(inpfile)
        sys.stdout = sys.__stdout__
       
if __name__ == '__main__':
    ''' '''
    if len(sys.argv) == 2:
        main(sys.argv[1])
    else:
        print 'Wrong syntax. Try again.'

        